import React, { useState } from 'react'
import './BulletChat.css'
const BulletChat:React.FC=()=>{
    // <string[]>泛型加持
    const [danmakuList,setDanmakuList]=useState<string[]>([])
    // 输入
    const [inputValue,setInputValue]=useState('')
    // 
    const handleChange=()=>{

    }
    // 
    const handleSendDanmaku=()=>{

    }
    return (
        <div className='danmu'>
            <div className='danmu-container'>
                {
                    danmakuList.map((danma,i)=>(
                        <div key={i} className='danmaku'>
                            {danma}
                        </div>
                    ))  }
            </div>
            <div className='input-container'>
<input type='text' value={inputValue} onChange={handleChange} placeholder='写下你的评论' className='input-field' />
 <button className='send-button' onClick={handleSendDanmaku} >
发送
 </button>
            </div>

        </div>
    )
}
export default BulletChat

